<?php
/**
 * Name: VerifyImageController.class.php
 * Description: 图像验证
 * User: DIY
 * Date: 2016/9/9
 * Time: 15:26
 */

namespace Security\Controller;


use Think\Verify;

class VerifyImageController{

    /*
     * 生成图像验证码
     * */
    public function index(){
        $config = array(
            'length'=>4,
            'codeSet'=>'123456789QWERTYUIPASDFGHJKLZXCVBNMqwertyuipasdfghjklzxcvbnm'
        );
        if(I('get.w')){
            $config['imageW'] = I('get.w');
        }
        if(I('get.h')){
            $config['imageH'] = I('get.h');
        }
        $Verify = new Verify($config);
        $Verify->entry();
    }
}